package LawsonTransformJava.xref;
import java.sql.SQLException;
import java.util.TreeMap;

public class XrefEmployee extends CrossRef {

	private final static String TABLE_NAME = "xEMPLOYEE";
	static final String XLATE_ERROR = "EE_ERROR";

	//TreeMap<String, String> employees = new TreeMap<String, String>();
	
	public XrefEmployee() throws SQLException {
			stmt = xref.getDataStatement();
			rslt = stmt.executeQuery("SELECT * FROM " + TABLE_NAME);
			super.XLATE_ERROR=XLATE_ERROR;
			while (rslt.next()) {
				int oldemployee = rslt.getInt(1);
				int newemployee = rslt.getInt(2);
				values.put(String.valueOf(oldemployee), String.valueOf(newemployee));
			}
	}
	
//	public String xlate(String employee) {
//		return super.xlate(employee);
//		String newemployee = employees.get(employee);
//		return (newemployee==null?XLATE_ERROR:newemployee);
//	}
}
